package com.ylx.mapper;

import com.ylx.pojo.Goods;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface GoodsMapper {


    List<Goods> selectAll ();

    void add (Goods goods);

    void update (Goods goods);

    void delete (@Param("ids") int[] ids);


    @ResultMap("goodsResultMap")
    @Select("select * from menu limit #{begin},#{size}")
    List<Goods> selectByPage (@Param("begin") int begin, @Param("size") int size);

    @Select("select count(*) from menu ")
    int totalCount ();

    List<Goods> selectByPageCondition (@Param("begin") int begin, @Param("size") int size, @Param("goods") Goods goods);

    int totalCountCondition (Goods goods);

    List<Goods> getProducts ();

    Goods getProductsById (String id);

    Goods getProductsById1 (String id);

    void addMenu(Goods goods);

    void addRecipe(Goods goods);

    int deleteMenu (String id);

    void updateStatusById(String id);

    List<Goods> selectByCondition(String goodsName);

    List<Goods> selectByCondition1(String goodsName);

    void updateRecipe (Goods goods);


}
